﻿using OASystem.BLL.Service;
using OASystem.Model;
using OASystem.Models;
using OASystem.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace OASystem.Controllers
{
    public class Role_TailController : Controller
    {
        private Role_TailService _TailService = new Role_TailService();
        /// <summary>
        /// 添加角色
        /// </summary>
        /// <param name="userinfo"></param>
        /// <returns></returns>
        public JsonResult AddRole(Position position)
        {
            Operate operate = new Operate();
            operate.Success = _TailService.Add(position);
            return Json(operate);
        }
        /// <summary>
        /// 判段是否有重复数据
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public JsonResult QueryRole(string name)
        {
            ResponseResult result = new ResponseResult();
            result = _TailService.QueryRole(name);
            return Json(result);
        }
    }
}